###################################
# RSS Guard
# Author: Martin Rotter
# Contrib: Petr Vaněk
# Contrib: Radek Janoštík
# This is Qt Creator project file
###################################
QT       += core gui webkit xml network
DESTDIR = build
OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build
SUBDIRS += extensions
TARGET = rssguard
TEMPLATE = app
LANGUAGE  = C++

# let's be draconic... it's better to test it sometimes with these options
#QMAKE_CXXFLAGS += -Wall -Werror

INCLUDEPATH += src

###################################
### Sources (*.cpp)
SOURCES += \
    src/main.cpp\
    src/formmain.cpp \
    src/rssitem.cpp \
    src/formabout.cpp \
    src/rssfeed.cpp \
    src/rssreader.cpp \
    src/formeditfeed.cpp \
    src/formsettings.cpp \
    src/rssthread.cpp \
    src/lineedit.cpp \
    src/treewidget.cpp \
    src/formeditcategory.cpp \
    src/singleapplication.cpp \
    src/updateworker.cpp \
    src/rssfactory.cpp \
    src/uifactory.cpp \
    src/appfactory.cpp
### Headers (*.h)
HEADERS  += \
    src/formmain.h \
    src/rssitem.h \
    src/formabout.h \
    src/rssfeed.h \
    src/rssreader.h \
    src/formeditfeed.h \
    src/formsettings.h \
    src/rssthread.h \
    src/lineedit.h \
    src/treewidget.h \
    src/tabwidget.h \
    src/timer.h \
    src/systemtrayicon.h \
    src/formeditcategory.h \
    src/singleapplication.h \
    src/updateworker.h \
    src/rssfactory.h \
    src/uifactory.h \
    src/appfactory.h
### Forms (*.ui)
FORMS    += \
    ui/formmain.ui \
    ui/formabout.ui \
    ui/formeditfeed.ui \
    ui/formsettings.ui \
    ui/formeditcategory.ui
### Resources (*.qrc)
RESOURCES += \
    RSSGuard.qrc
### Translations (*.ts)
TRANSLATIONS += \
    localization/rssguard_cs.ts \
    localization/rssguard_es.ts \
    localization/rssguard_ko.ts \
    localization/rssguard_ru.ts \
    localization/rssguard_da.ts \
    localization/rssguard_fr.ts
### Other files
OTHER_FILES += \
    src/definitions.h.in \
    resources/text/COPYING \
    resources/text/CHANGELOG \
    resources/text/AUTHORS \
    CMakeLists.txt \
    resources/RSSGuard_win.rc \
    resources/RSSGuard_os2.rc
    translations.files = localization/*.qm \
    resources/aur/git/PKGBUILD \
    resources/aur/stable/PKGBUILD
    desktop.files = resources/desktops/rssguard.desktop
    icon.files = resources/graphics/rssguard.png

### OS dependent settings
win32 {
    win32:RC_FILE = resources/RSSGuard.rc
    }
unix {
    QT += dbus
    HEADERS += src/dbusadaptor.h
    isEmpty(PREFIX) {
        PREFIX =   /usr
    }
    target.path =  $$PREFIX/bin
    translations.path =  $$PREFIX/share/rssguard/l10n
    desktop.path =  $$PREFIX/share/applications
    icon.path =  $$PREFIX/share/pixmaps
    INSTALLS +=  target translations desktop icon
}
macx {
    ICON = resources/macosx/rssguard.icns
    QMAKE_INFO_PLIST = resources/macosx/Info.plist
}
